﻿@model IEnumerable<TruckingApplication.Dal.EntityModels.RESOURCE_COMPANY>

<table id="tableResources" class="display" style="max-width:99%;">
    <thead>
        <tr>
            <th>
                Type
            </th>
            <th>
                Name
            </th>
            <th>
                Phone
            </th>
            <th>
                Email
            </th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.RESOURCE.RESOURCE_TYPE.resourceType)
        </td>
        <td>
            @{ var name = string.Format("{0} {1}", item.RESOURCE.firstName, item.RESOURCE.lastName);}
            @Html.ActionLink(name, "Details", "Resource", new { id = item.resourceID}, null)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RESOURCE.phone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RESOURCE.email)
        </td>
    </tr>
}
    </tbody>
    <tfoot>
        <tr>
            <th>
                Type
            </th>
            <th>
                Name
            </th>
            <th>
                Phone
            </th>
            <th>
                Email
            </th>
        </tr>
    </tfoot>
</table>

